package com.ruoyi.huoyun.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.huoyun.finance.mapper.AccountPayableMapper;
import com.ruoyi.huoyun.finance.domain.AccountPayable;
import com.ruoyi.huoyun.finance.service.IAccountPayableService;

/**
 * 应付账单Service业务层处理
 * 
 * @author mj
 * @date 2021-11-29
 */
@Service
public class AccountPayableServiceImpl implements IAccountPayableService 
{
    @Autowired
    private AccountPayableMapper accountPayableMapper;

    /**
     * 查询应付账单
     * 
     * @param voucherPayableNo 应付账单主键
     * @return 应付账单
     */
    @Override
    public AccountPayable selectAccountPayableByVoucherPayableNo(String voucherPayableNo)
    {
        return accountPayableMapper.selectAccountPayableByVoucherPayableNo(voucherPayableNo);
    }

    /**
     * 查询应付账单列表
     * 
     * @param accountPayable 应付账单
     * @return 应付账单
     */
    @Override
    public List<AccountPayable> selectAccountPayableList(AccountPayable accountPayable)
    {
        return accountPayableMapper.selectAccountPayableList(accountPayable);
    }

    /**
     * 新增应付账单
     * 
     * @param accountPayable 应付账单
     * @return 结果
     */
    @Override
    public int insertAccountPayable(AccountPayable accountPayable)
    {
        return accountPayableMapper.insertAccountPayable(accountPayable);
    }

    /**
     * 修改应付账单
     * 
     * @param accountPayable 应付账单
     * @return 结果
     */
    @Override
    public int updateAccountPayable(AccountPayable accountPayable)
    {
        return accountPayableMapper.updateAccountPayable(accountPayable);
    }

    /**
     * 批量删除应付账单
     * 
     * @param voucherPayableNos 需要删除的应付账单主键
     * @return 结果
     */
    @Override
    public int deleteAccountPayableByVoucherPayableNos(String[] voucherPayableNos)
    {
        return accountPayableMapper.deleteAccountPayableByVoucherPayableNos(voucherPayableNos);
    }

    /**
     * 删除应付账单信息
     * 
     * @param voucherPayableNo 应付账单主键
     * @return 结果
     */
    @Override
    public int deleteAccountPayableByVoucherPayableNo(String voucherPayableNo)
    {
        return accountPayableMapper.deleteAccountPayableByVoucherPayableNo(voucherPayableNo);
    }
}
